package Assignment1;


import java.util.Comparator;

public class GDPComparator implements Comparator<Province>,java.io.Serializable{
    @Override
    public int compare(Province o1, Province o2) {
        int area1 = o1.getRanking();
        int area2 = o2.getRanking();

        if (area1 < area2) {
            return -1;
        }else if (area1 == area2) {
            return 0;
        }else {
            return 1;
        }
    }
}
